// 导入自己封装的axios实例对象
import request from '@/utils/request'
// 导入仓库实例
// import store from '@/store'

// 登录请求
export const Login = data => {
    return request({
        url: '/v1_0/authorizations',
        method: 'post',
        data
    })
}

// 获取验证码
export const getSms = data => {
    return request({
        url: '/v1_0/sms/codes/' + data,
        method: 'GET'
    })
}

// 获取用户资料
export const getUserInfo = () => {
        return request({
            url: '/v1_0/user',
            // headers:{
            //   Authorization:'Bearer '+store.getters.token
            // }
        })
    }
    // 收关注
export const addFollow = data => {
        return request({
            method: 'POST',
            url: '/v1_0/user/followings',
            data
        })
    }
    // 取消关注
export const deleteFollow = target => {
    return request({
        method: 'DELETE',
        url: '/v1_0/user/followings/' + target
    })
}